/**
 * @description: Job
 */

import type { CommonAPI } from '../types/all'
import { defHttp } from '../http'

/** 任务详情 */
export const getComputeJobDetailApi: CommonAPI<
  '/v1/compute/job',
  'get'
> = params => defHttp.get(`/v1/compute/job`, { params })

/** 任务列表 */
export const getComputeJobListApi: CommonAPI<
  '/v1/compute/job/list',
  'get'
> = params => defHttp.get(`/v1/compute/job/list`, { params })

/** 通过订单id获取资源状态 通用 */
export const postComputeJobRetryApi: CommonAPI<
  '/v1/compute/job/retry',
  'post'
> = data => defHttp.post(`/v1/compute/job/retry`, data)
